//
//  BRScanView.h
//  BrezzeSaaS
//
//  Created by IOS on 2021/9/7.
//  Copyright © 2021 Brezze GWG. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef void(^BRScanBlock)(NSArray *metadataObjects,NSString *lastUrlStr);

@interface BRScanView : UIView

- (instancetype)initWithFrame:(CGRect)frame needDown:(BOOL)isNeed;

@property(nonatomic, strong) CALayer *maskLayer;

/**
 *  五个类
 */
@property(nonatomic, strong) AVCaptureDevice *device;

@property(nonatomic, strong)  AVCaptureDeviceInput *input;

@property(nonatomic, strong)  AVCaptureMetadataOutput *output;

@property(nonatomic, strong) AVCaptureSession *session;

@property (nonatomic,assign) BOOL isOpenLinght;

@property (nonatomic,copy) BRScanBlock scanBlock;


- (void)startRuning;
- (void)stopRuning;


- (void)startAnimate;

/// 是否需要下移
@property (nonatomic,assign) BOOL isNeedDown;

@end

NS_ASSUME_NONNULL_END
